package br.com.klis.batendoumabola.client.event;

import com.google.gwt.event.shared.GwtEvent;

/**
 * @author Ikai Lan
 * 
 * Represents a GalleryUpdatedEvent to fire to the message bus for all listeners.
 * 
 *	Inspiration:  
 * 	http://stackoverflow.com/questions/2951621/gwt-custom-events
 *
 */
public class GaleriaAtualizadaEvent extends GwtEvent<GaleriaAtualizadaEventHandler> {
	private final Long entidadeId;
    public static Type<GaleriaAtualizadaEventHandler> TYPE = new Type<GaleriaAtualizadaEventHandler>();
    
    public GaleriaAtualizadaEvent(Long id) {
        this.entidadeId = id;
      }
      
    public Long getEntidadeId() { return entidadeId; }

	@Override
	public Type<GaleriaAtualizadaEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(GaleriaAtualizadaEventHandler handler) {
		handler.onGaleriaAtualizada(this);
	}

}
